package com.rc.evcharger.mapper.discount;


import com.rc.evcharger.common.base.BaseMapper;
import com.rc.evcharger.model.discount.TenantDiscountPolicy;
import com.rc.evcharger.model.discount.TenantDiscountPolicyExample;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

public interface TenantDiscountPolicyMapper extends BaseMapper<Long, TenantDiscountPolicy, TenantDiscountPolicyExample> {

    TenantDiscountPolicy selectValidDPolicy(@Param(value = "discountPolicyId") Long discountPolicyId,
                                            @Param(value = "date") Date date,
                                            @Param(value = "discountType") String discountType);

    TenantDiscountPolicy selectTotalMember(@Param(value = "elecStationId") Long elecStationId,
                                           @Param(value = "date") Date date,
                                           @Param(value = "discountType") String discountType);

    TenantDiscountPolicy selectByEnterMemberIdAndEsId(@Param(value = "enterpriseMemberId") Long enterpriseMemberId,
                                                      @Param(value = "elecStationId") Long elecStationId);

    TenantDiscountPolicy selectVsealidDPolicyByEsId(@Param(value = "elecStationId") Long elecStationId,
                                                    @Param(value = "policyMemberType") String policyMemberType);

    List<TenantDiscountPolicy> selectVsealidDPolicyByEsIdList(@Param(value = "elecStationId") Long elecStationId,
                                                    @Param(value = "policyMemberType") String policyMemberType);

    TenantDiscountPolicy selectHlhtValidDPolicyByEsId(@Param(value = "elecStationId") Long elecStationId,
                                                    @Param(value = "hlhtMemberId") Long hlhtMemberId);


}